"""share_report URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path
from report.views import index_view, post, query_view, rpt_post, rpt_view, get_file_link, about_view, login, error403

app_name = 'report'

urlpatterns = [

    path('err403/', error403, name='err403'),
    path('login/', login, name='login'),

    path('query/<int:idx>/', query_view, name='query'),

    path('post/<int:idx>/', post, name='post'),  # 主页提交excel
    path('rpt_view/<int:idx>/', rpt_view, name='rpt_view'),  # 提交附加报告view
    path('rpt_upload/<int:idx>/<int:pk>', rpt_post, name='rpt_upload'),  # 提交附加报告
    path('rpt_download/<int:idx>/<int:pk>/', get_file_link, name='rpt_download'),  # 下载报告文件

    path('<int:idx>/', index_view, name='index'),  # 加工
    path('about/', about_view, name='about'),  # 关于
]
